
package hasthi.container;

import rice.p2p.commonapi.Id;

public class NodeAddress {
    private Id addressAsObject;
    private String addressAsString;
    private int rank;
    
    public int getRank() {
        return rank;
    }

    public NodeAddress(String addressAsObject, String addressAsString) {
        this.addressAsObject = rice.pastry.Id.build(addressAsObject);
        this.addressAsString = addressAsString;
    }
    
    public NodeAddress(Id addressAsObject, String addressAsString) {
        this.addressAsObject = addressAsObject;
        this.addressAsString = addressAsString;
    }
    
    public NodeAddress(String addressAsString) {
        this.addressAsString = addressAsString;
    }
    public NodeAddress(Id addressAsObject) {
        this.addressAsObject = addressAsObject;
    }
    public Id getAddressAsObject() {
        return addressAsObject;
    }
    public String getAddressAsString() {
        return addressAsString;
    }
}

